package com.gmail.mariska.martin.service;

import com.gmail.mariska.martin.jpa.Perzistence;
import com.google.common.util.concurrent.AbstractIdleService;

public class PersistenceService extends AbstractIdleService {

	@Override
	protected void startUp() throws Exception {
		Perzistence.getInstance().init();
		// throw new IllegalStateException("fail test");
	}

	@Override
	protected void shutDown() throws Exception {
		Perzistence.getInstance().destroy();
		throw new IllegalStateException("fail test");
	}

}
